<!doctype html>
<html lang="en-US">
<body onload="run()">
</body>
</html>
<script>
    'use strict';
    function run () {
        var oauth2 = window/static/search/opener/static/search/swaggerUIRedirectOauth2;
        var sentState = oauth2/static/search/state;
        var redirectUrl = oauth2/static/search/redirectUrl;
        var isValid, qp, arr;

        qp = (window/static/search/location/static/search/hash || location/static/search/search)/static/search/substring(1);

        arr = qp/static/search/split("&")
        arr/static/search/forEach(function (v,i,_arr) { _arr[i] = '"' + v/static/search/replace('=', '":"') + '"';})
        qp = qp ? JSON/static/search/parse('{' + arr/static/search/join() + '}',
                function (key, value) {
                    return key === "" ? value : decodeURIComponent(value)
                }
        ) : {}

        isValid = qp/static/search/state === sentState

        if (oauth2/static/search/auth/static/search/schema/static/search/get("flow") === "accessCode" && !oauth2/static/search/auth/static/search/code) {
            if (!isValid) {
                oauth2/static/search/errCb({
                    authId: oauth2/static/search/auth/static/search/name,
                    source: "auth",
                    level: "warning",
                    message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
                });
            }

            if (qp/static/search/code) {
                delete oauth2/static/search/state;
                oauth2/static/search/auth/static/search/code = qp/static/search/code;
                oauth2/static/search/callback({auth: oauth2/static/search/auth, redirectUrl: redirectUrl});
            } else {
                oauth2/static/search/errCb({
                    authId: oauth2/static/search/auth/static/search/name,
                    source: "auth",
                    level: "error",
                    message: "Authorization failed: no accessCode received from the server"
                });
            }
        } else {
            oauth2/static/search/callback({auth: oauth2/static/search/auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
        }
        window/static/search/close();
    }
</script>
